#!/usr/bin/env python
# -*- coding: UTF-8 -*-
from django.urls import path, re_path
from . import views
from rest_framework.routers import DefaultRouter

urlpatterns = [
    # path("", views.AreaListView.as_view()),
    # re_path(r'(?P<pk>\d+)/$', views.AreaDetailView.as_view()),
]
router = DefaultRouter()
router.register(r"", views.AreaViewSet,
                base_name="areas")  # 如果视图集中没有给queryset指定查询集则base_name是必传项，
# 如果视图集给queryset指定不填写base_name则使用model的小写为base_name
urlpatterns += router.urls
